package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.client.jd.vo.PrintPullDataVO;
import com.starlink.common.annotation.client.weixin.UserPurchaseRes;
import com.starlink.model.request.other.StarOrderRefundRequest;
import com.starlink.model.request.other.StarOrderSubmitRequest;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.OtherOrderDO;
import com.starlink.model.request.OtherOrderRequest;
import com.starlink.model.vo.OtherOrderVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface OtherOrderService extends IService<OtherOrderDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    OtherOrderVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<OtherOrderVO> pageQuery(Pageable pageable,OtherOrderRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<OtherOrderVO> listQuery(OtherOrderRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(OtherOrderRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(OtherOrderRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    /**
     * 预支付下单
     * @param request
     * @return
     */
    UserPurchaseRes payment(StarOrderSubmitRequest request);

    Boolean writeOff(OtherOrderRequest request);

    Boolean refund(StarOrderRefundRequest request);

    Boolean deliverySubmitJdOrder(OtherOrderRequest request);

    PrintPullDataVO getPrintData(OtherOrderRequest request);

    Boolean confirm(OtherOrderRequest request);
}
